import App from './App'
import uvUI from '@/uni_modules/uv-ui-tools'

// #ifndef VUE3
import Vue from 'vue'
import './uni.promisify.adaptor'
Vue.config.productionTip = false
App.mpType = 'app'
Vue.use(uvUI);
const app = new Vue({
  ...App
})
app.$mount()
// #endif

// #ifdef VUE3
import { createSSRApp } from 'vue'
import GButton from "@/components/GButton/index.vue";
import GFooter from "@/components/GFooter/index.vue";
import GKeyboard from "@/components/GKeyboard/index.vue";
import GToast from "@/components/GToast/index.vue";
import GShadow from "@/components/GShadow/index.vue";
import GSetting from "@/components/GSetting/index.vue";


export function createApp() {
  const app = createSSRApp(App)
  app.use(uvUI);
  app.component("g-button", GButton); // 按钮组件
  app.component("g-footer", GFooter); // 底部组件
  app.component("g-keyboard", GKeyboard); // 键盘组件
  app.component("g-toast", GToast); // 提示组件
  app.component("g-shadow", GShadow); // 阴影组件
  app.component("g-setting", GSetting); // 设置组件
  return {
    app
  }
}
// #endif